package cn.xo68.ide.plugin.common.git;

public class CommitRun extends AbstractGitRun {

    private final String[] filePatterns;
    private final String commitRemark;
    
    
    
    public CommitRun(String commitRemark,String[] filePatterns) {
        super();
        this.commitRemark=commitRemark;
        this.filePatterns=filePatterns;
    }
    
    @Override
    public void run(GitClient gitClient) throws Exception {
        if(filePatterns!=null || filePatterns.length<1) {
            gitClient.commit(commitRemark,filePatterns);
        }else {
            gitClient.commit(commitRemark);
        }
    }

}
